package com.qiangshi.realTimeInformation.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qiangshi.common.core.domain.vo.BarChartsVO;
import com.qiangshi.realTimeInformation.domain.QsRealTimeInformation;
import com.qiangshi.realTimeInformation.domain.to.QsRealTimeInformationListTo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * RealTimeInformationService接口
 *
 * @author ccm
 * @date 2022-03-02
 */
public interface IQsRealTimeInformationService extends IService<QsRealTimeInformation> {
    /**
     * 查询RealTimeInformation列表
     *
     * @param realTimeInformationListTo RealTimeInformation
     * @return RealTimeInformation集合
     */
    List<QsRealTimeInformation> selectQsRealTimeInformationList(QsRealTimeInformationListTo realTimeInformationListTo);


    List<BarChartsVO> buildBarChartsVOList(QsRealTimeInformationListTo realTimeInformationListTo, List<QsRealTimeInformation> realTimeInformationList);

    List<QsRealTimeInformation> selectQsRealTimeInformationListStatistics(QsRealTimeInformationListTo realTimeInformationListTo, List<QsRealTimeInformation> realTimeInformationList);

    @Transactional(
            rollbackFor = {Exception.class}
    )
    void handleRealTimeInformation(List<String> tableNameList);

    @Transactional(
            rollbackFor = {Exception.class}
    )
    Boolean createNewTable(String tableName, String remark);

    @Transactional(
            rollbackFor = {Exception.class}
    )
    Boolean createNewTable(List<String> tableNameList);
}
